Links across interconnected networks vary substantially with respect to such factors as bandwidth, packet latency, and error and loss rates. Before network protocols and distributed applications are deployed in a real network, it is critical that they be thoroughly tested under various realistic network conditions, to ensure correctness and to verify performance characteristics. Testing in an isolated real network is generally impractical. Therefore, testing typically involves simulation and emulation.
Network simulators generally attempt to provide a rich set of protocol modules and configuration tools suitable for conducting customized simulation experiments. However, network simulation suffers from a number of limitations. Simulators rely principally on models of both the physical network infrastructure and networking protocols. Models by definition only approximate the real conditions being tested, and in complex situations it is often impossible to develop accurate models for purposes of simulation. The functionalities provided by simulation modules are merely logical operations; thus, an implementation in a simulator must be modified before it can be deployed within a target network. Network simulators consume significant resources when the network being simulated is sufficiently large, and they do not provide a view of the network end user's experience.
By contrast, network emulators permit applications and protocols to be tested in real time, on real machines, such as locally-linked computers, using real implementations of network protocols. An emulator includes a supplementary means for imposing synthetic delays and faults on the real network traffic. In effect, the emulator comprises a virtual network with respect to the host machine or machines on which the network applications being tested are running. For a network emulator to be useful, however, it is necessary that it include techniques for emulating various network conditions realistically and accurately.
Packet out-of-order behavior is one particular real network condition that many network emulators have sought to emulate, a task that is made hindered by the difficulty with which such behavior is expressed mathematically. To emulate packet reordering, the order of packets must be altered so that the packet sequence arriving at a receiver is not the same as the sequence that left the sender. Most existing packet reorder emulation algorithms use a buffer to cache arriving packets and reorder the packets by adjusting the order in the buffer. In such cases, a packet out-of-order condition occurs only if there are multiple packets in the buffer. However, for multiple packets to be in the buffer, the sending bit rate must be greater than the underlying bandwidth. Therefore, the likelihood of having multiple packets in the buffer is fairly small. Moreover, in some network protocols, including TCP, the sending rate is adapted to underlying bandwidth conditions. This further reduces the likelihood of having multiple packets in the buffer.